<header class="layout head padding-small">

    <h1 class="logo"></h1>
    <div class="search radius-big">
        <div class="s-input-tab inlineBlock">
            <div class="s-inp-txt text-white">商品</div>
            <div class="s-input-tab-nav off" id="J_TabNav">
                <ul class="radius-big text-white">
                    <li class="goods" data-act="search"><i class="s-icon"></i>商品</li>
                    <li class="store" data-act="shop_search"><i class="s-icon"></i>商城</li>
                    <li class="brand" data-act="brand"><i class="s-icon"></i>品牌</li>
                </ul>
            </div>
        </div>
        <style type="text/css">
            /*input：placeholder color*/
            ::-webkit-input-placeholder { /* WebKit browsers */  color:#ECD8D9; }
            :-moz-placeholder { /* Mozilla Firefox 4 to 18 */    color:#ECD8D9; }
            ::-moz-placeholder { /* Mozilla Firefox 19+ */    color:#ECD8D9; }
            :-ms-input-placeholder { /* Internet Explorer 10+ */    color:#ECD8D9; }
        </style>
        <div class="s-frame float-right clearfix">
            <form class="c-form-suggest" id="J_Search" method="get">
                <input type="hidden" name="act" value="search">
                <input type="text" class="searchInp float-left text-white" name="keyword" placeholder="搜索其实很简单" />
                <span class="searchBtn float-right"><button type="submit"  class="sBtn bg-white">搜索</button></span>
            </form>
        </div>
    </div>
</header>

<?php if(!empty($output['adv']) && is_array($output['adv'])){?>
    <!--bannerS-->
    <div class="banner" data-pointer="1" data-interval="6" data-item="1" data-small="<?php echo count($output['adv']);?>" data-middle="<?php echo count($output['adv']);?>" data-big="<?php echo count($output['adv']);?>" data-style="border-red">
        <ul class="carousel">
            <?php foreach($output['adv'] as $item){
                $content = unserialize($item['adv_content']);
                $picurl= trim(str_replace(array('.jpg','.png'),array('.jpg'.APP_flash_IMG_EXT.'.jpg','.png'.APP_flash_IMG_EXT.'.png'),$content['adv_slide_pic']));
                ?>
                <li class="item"><a href='<?php echo replace_link($content['adv_slide_url'])?>' ><img src="<?php echo SiteUrl."/".ATTACH_ADV."/".$picurl?>" class="good-img"></a></li>
            <?php }?>
        </ul>
    </div>
   <?php }?>

<!--分类S-->
<div class="bg-white clearfix margin padding radius-big text-center list1">
    <a href="index.php?act=official_shop" class="x3"><i class="sub-icon1"></i><p class="pColor1">精品超市</p></a>
    <a href="index.php?act=seckill" class="x3"><i class="sub-icon2"></i><p class="pColor2">秒杀</p></a>
    <a href="index.php?act=activity" class="x3"><i class="sub-icon3"></i><p class="pColor3">九块邮</p></a>
    <a href="index.php?act=promotions&op=promotions" class="x3"><i class="sub-icon4"></i><p class="pColor4">促销</p></a>
    <a href="index.php?act=brand" class="x3 padding-top"><i class="sub-icon8"></i><p class="pColor8">品牌加盟</p></a>
    <a href="index.php?act=goods_xianshi" class="x3 padding-top"><i class="sub-icon5"></i><p class="pColor5">限时折扣</p></a>
    <a href="index.php?act=goods_recom" class="x3 padding-top"><i class="sub-icon6"></i><p class="pColor6">特别推荐</p></a>
    <a href="index.php?act=pointprod" class="x3 padding-top"><i class="sub-icon7"></i><p class="pColor7">积分中心</p></a>
</div>
<!--分类E-->
<!--美发沙龙S-->
<div class="bg-white clearfix margin padding radius-big text-center">
    <hr class="margin-top">
    <h3 class=" bg-white title">美发沙龙</h3>
    <a href="index.php?act=search&cate_id=624" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_11.jpg" alt="洗护类" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=623" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_12.jpg" alt="烫染类" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=374" class="x6 padding-top"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_13.jpg" alt="造型类" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=625" class="x6 padding-top"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_14.jpg" alt="工具设备" class="good-img97 border"></a>
</div>
<!--美发沙龙E-->
<!--美容院院装S-->
<div class="bg-white clearfix margin padding radius-big text-center">
    <hr class="margin-top">
    <h3 class=" bg-white title">美容院院装</h3>
    <a href="index.php?act=search&cate_id=355" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_1.jpg" alt="面部SPA类" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=356" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_2.jpg" alt="身体SPA类" class="good-img97 border"></a>
</div>
<!--美容院院装E-->
<!--美容院客装S-->
<div class="bg-white clearfix margin padding radius-big text-center">
    <hr class="margin-top">
    <h3 class=" bg-white title">美容院客装</h3>
    <a href="index.php?act=search&cate_id=357" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_3.jpg" alt="" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=738" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_4.jpg" alt="" class="good-img97 border"></a>
</div>
<!--美容院客装E-->


<!--工具仪器S-->
<div class="bg-white clearfix margin padding radius-big text-center">
    <hr class="margin-top">
    <h3 class=" bg-white title">工具仪器</h3>
    <a href="index.php?act=search&cate_id=391" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_7.jpg" alt="养生工具" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=600" class="x6"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_8.jpg" alt="美容工具" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=395" class="x6 padding-top"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_9.jpg" alt="美容仪器" class="good-img97 border"></a>
    <a href="index.php?act=search&cate_id=395" class="x6 padding-top"><img src="<?php echo TEMPLATES_PATH;?>/images2/cat_10.jpg" alt="美体仪器" class="good-img97 border"></a>
</div>
<!--工具仪器E-->
<script>
    /**
     *  绑定触屏触发事件
     * @param start
     * @param end
     */
    function bindEvent(start,end){
         if (start >= end) {
		   st.Next();
		} else {
			st.Previous();
		}
    }
	st.Run();
	var resetScrollEle = function(){
		$("#shelper").css("width",$("#newkeyword").width()+"px");
		var slider2Li = $("#idSlider2 li");
		slider2Li.css("width",$(".scroll-wrapper").width()+"px");
	}
	//重载
	window.addEventListener("resize",function(){
		st.Change = st._slider.offsetWidth/st._count;
		st.Next();
		resetScrollEle();
	});
	//屏幕旋转事件
	window.addEventListener("orientationchange",function(){
		st.Change = st._slider.offsetWidth/st._count;
		st.Next();
		resetScrollEle();
	})
	resetScrollEle();

	function clickResponse(obj){
		$('[res]').removeClass('on');
		$(obj).addClass('on');
		setTimeout(function(){
			$(obj).removeClass('on');
		},700);
	}
	$("#newkeyword").focus(function(){
		setTimeout(function(){
			 window.scrollTo(0,$("#newkeyword").offset().top-60);
		 },10);		
	});
	$(document).ready(function(){
		$("#categoryMenu li").addClass("route");
	})
    //首页head
    $(function(){
        var $sInp = $('.s-inp'),
            $select = $('.s-inp-select'),
            $sTxt = $('.s-inp-txt'),
            $sList = $('.s-select-list');
        $sInp.click(function(){
            //首页搜索类型的显隐
            $select.toggle();
        })
        $sList.click(function(){
            //首页选择搜索的类型
            var sTxt = $(this).text();
            $sTxt.text(sTxt);
            //更改表单提交的控制器
            var act = $(this).attr('data-act');
            $('form#J_Search input:hidden').val(act);
        });
    });
</script>

